xend: NUMA: fix division by zero on unpopulated nodes
authorKeir Fraser <keir.fraser@citrix.com>
Sun, 17 Jan 2010 18:01:08 +0000 (18:01 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Sun, 17 Jan 2010 18:01:08 +0000 (18:01 +0000)
commitc9aa64e0624be510f896ad90ec050bbbbeff4e7a
treec80077374417a33252582f23129eedfb23e79b2b
parent185c296921b09bed1040d303b9681e9f94386daf
xend: NUMA: fix division by zero on unpopulated nodes

nodes without memory will currently be disabled by also moving the
physical cores connected to them to other nodes. This leads to nodes
without CPUs and thus to a division by zero in the node allocation
algorithm.  Attached patch fixes this by checking for 0 before the
division. This fixes domain creation on boxes with memory-less nodes.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
tools/python/xen/xend/XendDomainInfo.py